Creating Data Sources and Connection Factory

<App_ContextName>.xml is the file where all the data sources are defined. Any data source, which is needed by an application to run, has to be configured in this file. OIPA requires ADMINSREVERDS, ADMINSERVERSOURCEDS, ASMINSERVERSEARCHDS, and ADMINSERVERREADONLYDS data sources to be created.

<%CATALINA_BASE%>\conf\Catalina\<HostName>\<App_DeploymentName>.xml. Catalina scans that directory and read the web application Context at runtime.

Note: We can find this <App_DeploymentName>.xml in generated distribution under tomcat\conf\Catalina\localhost. Copy this file to <%CATALINA_BASE%>\conf\Catalina\<HostName> and Please update jdbcDriver, jdbcUrl properties accordingly for the respective Databases.

Sample configuration of all the data sources which are required for OIPA to run:

Data Sources

Note: Following configuration is a sample for Oracle DB. Please update jdbcDriver, jdbcUrl properties accordingly for the respective Databases.

CycleService.xml at above defined location.

DataSources

<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="ADMINSERVERDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:FREE"
username="V12"
password="V12"
maxTotal="50"
maxIdle="10"
maxWaitMillis="-1"
validationQuery="SELECT 1 FROM DUAL"
testOnBorrow="true" />
<Resource name="ADMINSERVERRESOURCEDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:FREE"
username="V12"
password="V12"
maxTotal="50"
maxIdle="10"
maxWaitMillis="-1"
validationQuery="SELECT 1 FROM DUAL"
testOnBorrow="true" />
<Resource name="ADMINSERVERSEARCHDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:FREE"
username="V12"
password="V12"
maxTotal="50"
maxIdle="10"
maxWaitMillis="-1"
validationQuery="SELECT 1 FROM DUAL"
testOnBorrow="true" />
<Resource name="ADMINSERVERREADONLYDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:FREE"
username="V12"
password="V12"
maxTotal="50"
maxIdle="10"
maxWaitMillis="-1"
validationQuery="SELECT 1 FROM DUAL"
testOnBorrow="true" />
<Resource name="OIPAAUDITDS"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:FREE"
username="V12"
password="V12"
maxTotal="50"
maxIdle="10"
maxWaitMillis="-1"
validationQuery="SELECT 1 FROM DUAL"
testOnBorrow="true" />
</Context>

Note: In case of change in your domain, In %CATALINA_BASE%\conf\server.xml, find the <Engine> / <Host> section, typically Change Host.

<Engine name="Catalina" defaultHost="mydomain.com">   <Host name="mydomain.com" appBase="webapps" ...>

Change the path %CATALINA_BASE%\conf\Catalina\mydomain.com\<app-contextfile>.xml.

Then Tomcat will load /<app> (.i.e PASJava) for the virtual host mydomain.com.